package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.CollectQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.SearchQueryObject;
import cn.wolfcode.trip.base.query.TravelQueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface ITravelService {
    /**
     * 新增和编辑
     * @param travel
     */
    void saveOrUpdate(Travel travel);
    PageInfo query(TravelQueryObject qo);

    Travel getTravelById(Long id);

    void changeStatus(Travel travel);

    /**
     * 根据关键字查询该游记的总数
     * @param keyword
     * @return
     */
    int selectCountByKeyword(String keyword);

    /**
     * 通过关键字查询游记
     * @param qo
     * @return
     */
    PageInfo searchQuery(SearchQueryObject qo);

    /**
     * 查询用户收藏的游记
     * @param qo
     * @return
     */
    PageInfo selectForCollect(CollectQueryObject qo);

    /**
     * 获取该用户被点赞的未读游记
     * @param qo
     */
    PageInfo selectTravelForDoGood(TravelQueryObject qo);
}